<!-- 顶部吸顶通栏 -->

<div id="layout_top">
    <div class="center">
        <div class="left">
            <a href="http://127.0.0.1:5500/dist/online.html"><b>登录</b></a>
            <span>&nbsp;|&nbsp;</span>
            <a href="http://127.0.0.1:5500/dist/online.html"><b>注册</b></a>
        </div>
        <div class="right">
            <ul>
                <li><a href="">我的账户</a> </li>
                <li>|</li>
                <li><a href="" style="color: red;">补交货款</a> </li>
                <li>|</li>
                <li><a href="">配送查询</a> </li>
                <li>|</li>
                <li><a href="">订单查询</a> </li>
                <li>|</li>
                <li><a href="">帮助中心</a> </li>
            </ul>
        </div>
    </div>
</div>

<div style="height:30px"></div>

<!-- 头部logo -->

<div id="header_logo">
    <div class="logo_img">
        <a href="http://127.0.0.1:5500/dist/index.html">
            <img src="https://www.7hua.com/Tpl/2016skin/Public/images/logo.gif" alt="">
        </a>
    </div>
    <div class="logo_right">
        <img src="	https://www.7hua.com/Tpl/2016skin/Public/images/cart_next1.png" alt="">
    </div>
</div>
<!-- 一条红线 -->
<div class="red_line"></div>

<!-- 购物车来啦！逆行么？ -->
<form action="">
    <div class="layout_car">
        <div class="layout_car_center">
            <!-- 商品栏头部标题 -->
            <div class="car_header">
                <div class=" col goods_img">商品图片</div>
                <div class=" col goods_name">商品名称</div>
                <div class=" col goods_price">单价</div>
                <div class=" col goods_number">数量</div>
                <div class=" col goods_total">小计</div>
                <div class=" col goods_action">操作</div>
            </div>
            <!--商品详情内容分类  -->
            <div class="car_body">
                <div class="goods_border">
                    <div class="goods_info">
                        <!-- <div class="choice goods_img1">
                            <a href="">
                                <img src="https://img.7hua.com/proimgs/F-0111964201.jpg" alt="">
                            </a>
                        </div>
                        <div class="choice goods_name1">
                            <h3>就是爱你</h3>
                            <span>附加:&emsp;</span>
                            未选择附加产品
                        </div>
                        <div class="choice goods_price1">
                            215元
                        </div>
                        <div class="choice goods_number1">
                            <div class="change-goods-num clearfix J_changeGoodsNum"><a href="javascript:void(0)"
                                    class="J_minus" onclick="jiancart(0);"><i class="iconfont">-</i></a><input
                                    tyep="text" name="qty[]" id="qty0" value="1" data-num="1" data-buylimit="50"
                                    autocomplete="off" class="goods-num J_goodsNum"><a href="javascript:void(0)"
                                    class="J_plus" onclick="jiacart(0);"><i class="iconfont">+</i></a></div>
                        </div>
                        <div class="choice goods_total1">
                            215元
                        </div>
                        <div class="choice goods_action1">
                            <a href="/Cart/delcart/prono/011196" onclick="javascript:return confirm('确定要删除吗？');" title="删除" class="del J_delGoods"><i class="iconfont">×</i></a>
                        </div> -->
                    </div>
                </div>
            </div>
        </div>
    </div>

</form>

<!-- 大字 -->

<div id="text_buy">
    <h2>
        <span>买购物车中商品的人还买了</span>
    </h2>
</div>
<script src="./javascripts/jQuery.js"></script>
<script>
    $(function(){
        let cart = function(){
            if(localStorage.getItem("data1")){
                let data = {};
                try{
                    data = JSON.parse(localStorage.getItem("data1"))
                }catch{
                    data = {}
                }
                return data;
            }else{
                return {};
            }
        }()
        console.log(cart)
        $(".goods_info").append(
            `
            <div class="choice goods_img1">
                <a href="">
                    <img src="${cart.data1.img}" alt="">
                </a>
            </div>
            <div class="choice goods_name1">
                <h3>${cart.data1.name}</h3>
                <span>附加:&emsp;</span>
                未选择附加产品
            </div>
            <div class="choice goods_price1">
                ${cart.data1.price}元
            </div>
            <div class="choice goods_number1">
                <div class="change-goods-num clearfix J_changeGoodsNum">
                    <a href="javascript:void(0)" class="J_minus" onclick="jiancart(0);">
                        <i class="iconfont">
                            -
                        </i>
                    </a>
                <input tyep="text" name="qty[]" id="qty0" value="${cart.data1.cunt}" data-num="1" data-buylimit="50"
                autocomplete="off" class="goods-num J_goodsNum">
                    <a href="javascript:void(0)"class="J_plus" onclick="jiacart(0);">
                        <i class="iconfont">
                            +
                        </i>
                    </a>
                </div>
            </div>
            <div class="choice goods_total1">
                ${cart.data1.cunt * cart.data1.price}元
            </div>
            <div class="choice goods_action1">
                <a href="/Cart/delcart/prono/011196" onclick="javascript:return confirm('确定要删除吗？');" title="删除" class="del J_delGoods"><i class="iconfont">×</i></a>
            </div>
            `
        )
    })
</script>